Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐾 Add a plan details item to edit boot disk #1205

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

yaacov
Copy link
Member

@yaacov yaacov commented Jun 7, 2024

Ref: #1192

Allow users to set the plan rootDisk

Screenshots:
first-root-device
forth-root-device

edit-root-device-close
edit-root-device-create
edit-root-device-open

Screencast.from.2024-06-17.14-58-51.mp4

@yaacov yaacov added the enhancement Categorizes issue or PR as related to a new feature. label Jun 7, 2024
@yaacov yaacov added this to the 2.7.0 milestone Jun 7, 2024
@yaacov
Copy link
Member Author

yaacov commented Jun 7, 2024

@bkhizgiy hi, please take a look,

Notes:

  • when no rootDisk defined user see "First disk"
  • when user choose "First disk" the rootDisk is removed from the yaml
  • rootDisk is a string with values:
    '' - first disk
    '2' - second disc
    '3' - third ...
  • All vms has the same rootDisk value
  • If the UI see a manually edited rootDisk that has different rootDisk for some VMs, a warning is showed

Example o spec.vms with rootDisk:

vms:
    - id: vm-55
      name: DC0_H0_VM0
      rootDisk: '2'
    - id: vm-58
      name: DC0_H0_VM1
      rootDisk: '2'
    - id: vm-61
      name: DC0_C0_RP0_VM0
      rootDisk: '2'
    - id: vm-64
      name: DC0_C0_RP0_VM1
      rootDisk: '2'

@yaacov
Copy link
Member Author

yaacov commented Jun 7, 2024

waiting for: kubev2v/forklift#873

@bkhizgiy
Copy link
Member

Following our conversation, we have decided to update the string input in the UI to specify both the disk and partition the user wishes to set as the root.

For example:

For the first disk, please use the input sda.
For the second disk, please use the input sdb.
For the first partition of the first disk, please use the input sda1.
For the second partition of the second disk, please use the input sdb2.
And so on....

For help text we can add something of a sort:
When using a multi-boot VM, you can specify a particular root device. For example, sdb will refer to the second disk, while sda1 or sda2 will refer to the first or second partition on the first hard drive, respectively. If the specified root device does not exist or was not detected as a root device, the VM conversion will fail. For additional information see documentation

@yaacov yaacov force-pushed the add-rootDisk branch 4 times, most recently from 75e9c0c to 8743e5e Compare June 16, 2024 13:25
Copy link

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@yaacov
Copy link
Member Author

yaacov commented Jun 17, 2024

@bkhizgiy hi,

updates:
a. a user can enter any string as a root disk, no verification.
b. a set of pre defined root devices is available:

export const diskOptions = (t = (text: string) => text): DiskOption[] => [
  { key: '', description: t('Boot from first root device') },
  { key: 'sda', description: t('Boot from the first hard drive') },
  {
    key: 'sda1',
    description: t('Boot from the first partition on the first hard drive'),
  },
  {
    key: 'sda2',
    description: t('Boot from the second partition on the first hard drive'),
  },
  { key: 'sdb', description: t('Boot from the second hard drive') },
  {
    key: 'sdb1',
    description: t('Boot from the first partition on the second hard drive'),
  },
  {
    key: 'sdb2',
    description: t('Boot from the second partition on the second hard drive'),
  },
];

c. user can create new root device strings that are not in the pre defined options
d. in the YAML:

vms:
    - id: vm-23113
      name: mtv-rhel8-warm-sanity-nfs
      rootDisk: sdd
    - id: vm-23159
      name: mtv-rhel8-warm-sanity
      rootDisk: sdd

e. i also updated the description screenshots

@yaacov
Copy link
Member Author

yaacov commented Jun 17, 2024

@bkhizgiy hi,
update:
a. added /dev/ to the rootDisk string, YAML now looks:

vms:
    - id: vm-23113
      name: mtv-rhel8-warm-sanity-nfs
      rootDisk: /dev/sda1
    - id: vm-23159
      name: mtv-rhel8-warm-sanity
      rootDisk: /dev/sda1

@yaacov yaacov force-pushed the add-rootDisk branch 3 times, most recently from 6d53343 to a682f81 Compare June 18, 2024 08:44
@yaacov yaacov merged commit 0af2f6e into kubev2v:main Jun 18, 2024
7 checks passed
@yaacov yaacov modified the milestones: 2.7.0, 2.6.3 Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants